<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/jquery-3.3.1.min.js"></script>
    <script>
        function login(){
            $.ajax({
                url: 'http://localhost:9998/myweb/login',
                data: {
                    username: $('#username').val(),
                    password: $('#password').val()
                },
                dataType: 'json',
                success: function(res){
                    console.log(res)
                }
            })
        }
    </script>
</head>
<body>
    <h2>用户登录</h2>
    用户名：<input type="text" id="username"> <br>
    密码：<input type="password" id="password"></br>
    <input type="button" value="登录" onclick="login()">
</body>
</html>